<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$da['title']?></title>
<link rel="stylesheet" type="text/css" href="res/css/css.css"/>
<script type="text/javascript" src="res/js/jquery.js"></script>
<script type="text/javascript" src="res/js/js.js"></script>
<script type="text/javascript" src="res/js/base64-min.js"></script>
<link rel="shortcut icon" href="favicon.ico" />
<style>
.lmaisft{width:420px;border-radius:10px;text-align:left; background:rgba(0,0,0,0.1);border:0px #dddddd solid;}
.box{box-shadow:0px 5px 15px 1px rgba(0,0,0,0.05);}
.btn-danger{background-color:#d9534f;}
<?php
$col = getconfig('apptheme','#336699');
$cola= c('image')->colorTorgb($col);
echo 'body{--main-color:'.$col.';background:rgba('.$cola[0].','.$cola[1].','.$cola[2].',0.05)}';
?>
</style>
<script>
function getpassobj(){
	return $('input[type=password]');
}
function loginsubmit(){
	var user = form('rockofficeuser').value,pass=getpassobj().val();
	if(!user){
		js.setmsg('请输入用户名');return;
	}
	if(!pass){
		js.setmsg('请输入密码');return;
	}
	js.setmsg('登录中...');
	var odg = form('button');
	js.setoption('lguser', user);
	js.setoption('lgpass', pass);
	odg.disabled=true;
	js.ajax({
		url:'?m=login&a=logincheck',data:{user:user,pass:pass,device:device,cform:'PC'},
		type:'post',
		dataType:'json',
		success:function(ret){
			if(!ret.success){
				odg.disabled=false;
				js.setmsg(ret.msg);
			}else{
				js.setoption('lgface', ret.data.face);
				get('imglogo').src = ret.data.face;
				js.setoption('admintoken', ret.data.token);
				js.setmsg('登录成功跳转中','green');
				var burl = js.request('backurl');
				if(burl)burl = jm.base64decode(burl);
				if(!burl)burl= '?m=index';
				js.location(burl);
			}
		}
	});
}
function initbody(){
	form('rockofficeuser').value = js.getoption('lguser');
	getpassobj().val(js.getoption('lgpass'));
	var fac = js.getoption('lgface');
	if(fac)get('imglogo').src = fac;
	resizewh();
	$(window).resize(resizewh);
}
function resizewh(){
	var h = ($(document).height()-520)*0.5;
	$('#topheih').css('height',''+h+'px');
}
</script>
</head>


<body>

<div align="center" style="position:absolute;width:100%">
	<div id="topheih" class="blank40"></div>

	<div style="font-size:30px"><b><?=$da['title']?></b></div>
	<div class="blank30"></div>
	<div class="lmaisft box">
		<div class="blank20"></div>
		<div  align="center"><img title="<?=URL?>" class="box" onclick="location.reload()" style="border-radius:50%;border:0px #ffffff solid; background:white" src="images/logo.png" id="imglogo" align="absmiddle" height="100" width="100"><b style="font-size:22px"></b></div>
		<div class="blank10"></div>
		<form style="padding:20px;padding-left:80px" name="myform">	
			<div>
				<div>
					<div><input type="text" style="height:40px;width:260px;border-radius:5px" class="input" onKeyUp="if(event.keyCode==13)getpassobj().focus()" value="" autocomplete="off" placeholder="请输入帐号" name="rockofficeuser" ></div>
				</div>

				<div class="blank30"></div>
				<div>
					<div><input  style="height:40px;width:260px;border-radius:5px" class="input" onKeyUp="if(event.keyCode==13)loginsubmit()" value="" type="password" placeholder="请输入密码"></div>
				</div>
				<div class="blank10"></div>	
			</div>

			<div class="blank20"></div>

			<div align="left">
				<button type="button" onClick="loginsubmit()" style="padding:10px 30px;border-radius:5px" class="webbtn" name="button">登录</button>&nbsp;<span id="msgview"></span>
			</div>
			<div class="blank10"></div>
		</form>	
	</div>

	<div class="blank20"></div>
	<?php 
	include_once(''.P.'/public/footer.html');
	?>

</div>
</body>
</html>